package com.gfhd.multithread;

import com.gfhd.multithread.service.ThreadDemo1;
import com.gfhd.multithread.service.ThreadDemo2;
import com.gfhd.multithread.service.ThreadDemo3;
import com.gfhd.multithread.thread_comunication.ThreadDemo5;
import com.gfhd.multithread.thread_safe.ThreadDemo4;
import com.gfhd.multithread.threadpool.ThreadPoolDemo1;
import com.gfhd.multithread.timer.TimerDemo1;
import com.gfhd.multithread.timer.TimerDemo2;
import org.springframework.stereotype.Component;

@Component
public class MyRun {
    public void run1(){
        ThreadDemo1 threadDemo = new ThreadDemo1();
        threadDemo.test();
        System.out.println(System.getProperty("user.dir"));
    }
    public void run2(){
        ThreadDemo2 threadDemo = new ThreadDemo2();
        threadDemo.test2();
    }
    public void run3(){
        ThreadDemo3 threadDemo = new ThreadDemo3();
        threadDemo.test();
    }
    public void run4(){
        ThreadDemo4 threadDemo = new ThreadDemo4();
        threadDemo.test();
    }
    public void run5(){
        ThreadDemo5 threadDemo = new ThreadDemo5();
        threadDemo.test();
    }
    public void run6(){
        ThreadPoolDemo1 threadDemo = new ThreadPoolDemo1();
        threadDemo.test();
    }
    public void run7(){
        TimerDemo1 threadDemo = new TimerDemo1();
        threadDemo.test();
    }
    public void run8(){
        TimerDemo2 threadDemo = new TimerDemo2();
        threadDemo.test();
    }
}
